<template>
  <div class="app-container">
    <!--  {{this.$route.params.courseId}} -->
    <el-form ref="form" :model="form" label-width="100px">
      <el-form-item label="管理员姓名">
        <el-input v-model="AM.Name" />
      </el-form-item>
      <el-form-item label="管理员编号">
        <el-input v-model="AM.Serial_number" type="textarea" />
      </el-form-item>
        <el-button type="primary" @click="onSubmit">确认修改</el-button>
        <el-button @click="onCancel">取消修改</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      AM: {
        "Serial_number": "编号0",
        "Name": "name0"
      }
    };
  },
  created() {
    this.fatchDataById();
  },
  methods: {
    fatchDataById() {
      var courseId = this.$route.params.courseId;
      var vm = this;
      this.axios({
        methods: "GET",
        url:
          "http://localhost:8080/course-web/courseAttendance/getCourseAttendance?courseId" +
          courseId
      }).then(function(resp) {
        vm.AM = resp.data;
      });
    }
    /*  onSubmit() {
      this.$message('submit!')
    },
    onCancel() {
      this.$message({
        message: 'cancel!',
        type: 'warning'
      })
    } */
  }
};
</script>

<style scoped>
.line {
  text-align: center;
}
</style>
